package main

import (
	"fmt"
)

/*func main() {

	//中文
	//[\\u4e00-\\u9fa5]+
	str := `Alice 20 alice@gmail.com
    Bob 25 bob@outlook.com
    gerrylon 26 gerrylon@github.com`

	pat := regexp.MustCompile(`(?P<name>[a-zA-Z]+)\s+(?P<age>\d{1,2})\s+(?P<email>\w{1,12}@\w+\.com)`)

	users  := pat.FindAllStringSubmatch(str,-1)
	groupNames := pat.SubexpNames()

	fmt.Printf("%v, %v, %d, %d\n", users , groupNames, len(users ), len(groupNames))

	var result [] map[string]string


	// 转换为map
	for _, user := range users  {
		m := make(map[string]string)
		// 对每一行生成一个map
		for j, name := range groupNames {
			if j != 0 && name != "" {
				m[name] = strings.TrimSpace(user[j])
			}
		}
		result = append(result, m)

	}

	prettyResult, _ := json.MarshalIndent(result, "", "  ")

	fmt.Printf("%s\n", prettyResult)

}*/

func Test1(){

	str := "name:小王"

	fmt.Println(str)

}